4.ExoPlayer源码分析之prepare序列图
上面源码分析完了后,发现一脸懵逼,只是简单的知道了怎么调用的,都是啥,但是并不知道每个类具体是干啥的,以及他们之间的关联关系
SimpleExoPlayer->ExoPlayerImpl: player.prepare(mediaSource)
ExoPlayerImpl->ExoPlayerImplInternal: internalPlayer.prepare(mediaSource)
ExoPlayerImplInternal->ExoPlayerImplInternal: MSG_PREPARE
ExoPlayerImplInternal->ExoPlayerImplInternal: prepareInternal
ExoPlayerImplInternal->MediaSource: mediaSource.prepareSource()
ExoPlayerImplInternal->ExoPlayerImplInternal: DO_SOME_WORK
ExoPlayerImplInternal->MediaPeriodQueue: doSomeWork()
ExoPlayerImplInternal->Renderer: renderer.render()
MediaPeriodQueue->MediaPeriodHolder: queue.getPlayingPeriod()
MediaPeriodHolder->MediaPeriod: createMediaPeriod()
ExoPlayerImplInternal->MediaPeriod: doSomeWork(updatePeriods())
MediaPeriod->ExtractingLoadable: prepare()
ExtractingLoadable->DataSource: load()
ExtractingLoadable->Extracotr(Mp4Extractor): load()
Extracotr(Mp4Extractor)->Extracotr(Mp4Extractor): readAtomHeader() processAtomEnded()processMoovAtom
Extracotr(Mp4Extractor)->ProgressiveMediaPeriod: endTracks()
ProgressiveMediaPeriod->ExoPlayerImplInternal: onPrepared(MediaPeriod source)
ExoPlayerImplInternal->ExoPlayerImplInternal: handlePeriodPrepared
ExoPlayerImplInternal->Renderer: enableRenderer
Renderer->Renderer: if (isPlaying) {renderer.start()}
上一篇: 3. ExoPlayer源码分析之prepare方法
下一篇: 5. ExoPlayer源码分析之PlayerView
- 邮箱 :[email protected]
- Good Luck!